import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Layout Widget Demo"),
      ),
      body: DecoratedBoxWidget(),
    ),
  ));
}

class DecoratedBoxWidget extends StatelessWidget {
  const DecoratedBoxWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return DecoratedBox(
      decoration: BoxDecoration(
          gradient:
              LinearGradient(colors: [Colors.red, Colors.orange.shade700]),
          borderRadius: BorderRadius.circular(3.0), // 3像素圆角
          boxShadow: const [
            BoxShadow(
                color: Colors.black54,
                offset: Offset(2.0, 2.0),
                blurRadius: 100.0),
          ]
      ),
      child: const Padding(
        padding: EdgeInsets.symmetric(horizontal: 80.0, vertical: 18.0),
        child: Text(
          "Login",
          style: TextStyle(color: Colors.white),
        ),
      ),
    );
  }
}
